@echo off
:: 延迟2秒再执行
choice /t 2 /d y /n >nul
setlocal enabledelayedexpansion
 
for /f "tokens=2 delims=:" %%a in ('ipconfig ^| findstr /I "IPv4"') do (
    set ip=%%a
    echo !ip!
)
 
endlocal
pause
